//
//  ZhiWeiGuanLiListTableViewCell.m
//  EnterpriseEdition
//
//  Created by ypj on 2021/10/17.
//

#import "ZhiWeiGuanLiListTableViewCell.h"

@implementation ZhiWeiGuanLiListTableViewCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        _bgView = [[UIView alloc] init];

        UIBezierPath *shadowPath = [UIBezierPath
        bezierPathWithRect:_bgView.bounds];
       _bgView.layer.masksToBounds = NO;
       _bgView.layer.shadowColor = [UIColor blackColor].CGColor;
       _bgView.layer.shadowOffset = CGSizeMake(0.0f, 3.0f);
       _bgView.layer.shadowOpacity = 0.2f;
       _bgView.layer.shadowPath = shadowPath.CGPath;
        [self addSubview:_bgView];
        
        
        
        _paiZhaoLb = [[UILabel alloc] init];
        _paiZhaoLb.textColor = Black_Color;
        _paiZhaoLb.font = [UIFont systemFontOfSize:16.0];
        _paiZhaoLb.text = @"名门天境中心花园";
        [self addSubview:_paiZhaoLb];
        
       
        
        
        _statusLb = [[UILabel alloc] init];
        _statusLb.textColor = Red_Color;
        _statusLb.font = [UIFont systemFontOfSize:16.0];
        _statusLb.text = @"已发布";
        [self.bgView addSubview:_statusLb];
        
       
        
        
        
        
        _finishButton = [UIButton buttonWithType:UIButtonTypeCustom];
        _finishButton.titleLabel.font =[UIFont systemFontOfSize:14.0] ;
        [_finishButton setTitle:@"已完成" forState:0];
        [_finishButton setTitleColor:White_Color forState:0];
        _finishButton.backgroundColor=mainColor;
        [_finishButton createBordersWithColor:nil withCornerRadius:5.0 andWidth:0];
        [self.bgView addSubview:_finishButton];
        
       
               
        _delectButton = [UIButton buttonWithType:UIButtonTypeCustom];
        _delectButton.titleLabel.font =[UIFont systemFontOfSize:14.0] ;
        [_delectButton setTitle:@"删除" forState:0];
        [_delectButton setTitleColor:White_Color forState:0];
        _delectButton.backgroundColor=mainColor;
        [_delectButton createBordersWithColor:nil withCornerRadius:5.0 andWidth:0];
        [self.bgView addSubview:_delectButton];
        
       
        [_bgView mas_makeConstraints:^(MASConstraintMaker *make) {
          
            make.left.equalTo(self.mas_left).offset(16);
            make.right.equalTo(self.mas_right).offset(16);
            make.top.equalTo(self.mas_top).offset(10);
            make.bottom.equalTo(self.mas_bottom).offset(10);
        }];
        
        [_paiZhaoLb mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.bgView.mas_left).offset(26);
            make.top.equalTo(self.bgView.mas_top).offset(22);
            make.height.mas_equalTo(20);
        }];
        
        [_statusLb mas_makeConstraints:^(MASConstraintMaker *make) {
            make.right.equalTo(self.bgView.mas_right).offset(-22);
            make.top.equalTo(self.bgView.mas_top).offset(22);
            make.height.mas_equalTo(20);
        }];
        
        [_finishButton mas_makeConstraints:^(MASConstraintMaker *make) {
            make.size.mas_equalTo(CGSizeMake(64, 27));
            make.right.equalTo(self.bgView.mas_right).offset(-13);
            make.top.equalTo(self.bgView.mas_bottom).offset(-18);
        }];
        
        [_delectButton mas_makeConstraints:^(MASConstraintMaker *make) {
            make.size.mas_equalTo(CGSizeMake(64, 27));
            make.right.equalTo(self.bgView.mas_right).offset(-87);
            make.top.equalTo(self.bgView.mas_bottom).offset(-18);
        }];
    }
    return self;
}


+(CGFloat)cellHeight{
    return 174;
}
+(NSString *)reuseIdentifier{
    return @"ZhiWeiGuanLiListTableViewCell";
}
@end
